using namespace std;
#include "commun.h"

char* dtd_fileName;

int xml_parse(XMLArbre**);

extern int xml_debug;

int main(int argc, char **argv)
{
	int err;

  	xml_debug = 1; // pour enlever l'affichage de l'éxécution du parser, commenter cette ligne

	//partie xml
	XMLArbre * arbreXML;
	//FILE * xml_in;	
	//FILE * fid1;
	//fid1 = fopen("xml", "r");
	//xml_in = fid1;
	err = xml_parse(&arbreXML);
	if (err != 0) 
	{
		printf("Parse xml ended with %d error(s)\n", err);
		return 1;
	}

  	printf("Parse xml ended with success\n");

	arbreXML->afficher();

	//fclose(fid1);
	printf("************************************************************************************************************************************\n");
/*	
	//partie xslt
	XMLArbre * arbreXSLT;
	
	FILE * fid2;
	fid2 = fopen("xsl", "r");
	xml_in = fid2;
	err = xml_parse(&arbreXSLT);
	if (err != 0) 
	{
		printf("Parse xslt ended with %d error(s)\n", err);
		return 1;
	}

  	printf("Parse xslt ended with success\n");

	arbreXSLT->afficher();
	
	fclose(fid2);
*/
  /*FILE * fid;
  fid = fopen(dtd_fileName, "r");
  if(!dtd_fileName)
  {
  	printf("DTD not defined");
	return 1; 
  }
  dtd_in = fid;
  err = dtd_parse();
  fclose(fid);
  if (err != 0) printf("Parse ended with %d error(s)\n", err);
      	else  printf("Parse ended with success\n", err);
*/
  	return 0;
}
